package com.ezops.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name="CLIENT_FIELDS")
public class ClientFields implements  Comparable<ClientFields> , DomainEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="FIELD_ID")
	private int clientFieldId;
	
	@Column(name="FIELD_NAME")
	private String fieldName;
	
	@Column(name="CLIENT_ID")
	private int clientId;
	
	@Column(name="ASSET_ID")
	private int assetId;
	
	
	

	public String getId() {
		return String.valueOf(clientFieldId);
	}

	public void setId(int clientFieldId) {
		this.clientFieldId = clientFieldId;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public int getClientId() {
		return clientId;
	}

	public void setClientId(int clientId) {
		this.clientId = clientId;
	}

	public int getAssetId() {
		return assetId;
	}

	public void setAssetId(int assetId) {
		this.assetId = assetId;
	}

	@Override
	public int compareTo(ClientFields o) {
		return this.fieldName.toLowerCase().compareTo(o.getFieldName().toLowerCase());
	}

	@Transient
	public int getClientFieldId() {
		return clientFieldId;
	}

	@Transient
	public void setClientFieldId(int clientFieldId) {
		this.clientFieldId = clientFieldId;
	}


}
